Tasuta Windows Metro stiili mall Visual Basic kasutajatele.

Sisukord:

Tasuta Windows Metro stiili mall Visual Basic kasutajatele.
Tasuta Windows Metro stiili mall Visual Basic kasutajatele.

Video: Tasuta Windows Metro stiili mall Visual Basic kasutajatele.

Video: Tasuta Windows Metro stiili mall Visual Basic kasutajatele.
Video: Vlad and Niki pretend play with Toys - Funny stories for children - YouTube 2024, November
Anonim

Töötades Windows 8 rakenduse värskendusega, otsustasin ma kokku panna järgmise malli, et kasutajad saaksid kasutada neid, kes võivad ikkagi kasutada VB.Net 2010. Nagu keegi, kes õpib ikkagi kasutama Visual Studio tööriistu Windows 8 Developer Build, ma kirjutan endiselt rakendusi, kasutades VB.Net 2008/2010, ja arvasin, et see võib olla kasulik, kui keegi soovib oma rakendusi natuke minna.

Image
Image

Võite lehe allosas alla laadida juba ettevalmistatud malli.

Käivitage uus tühi projekt VB.netis (ma kasutan seda malli VB.Net Express 2010)

Lisage 2 vormi projekti. Märgistage need nii nagu pritsima ja peamine ja seadista nii FormBorderStyle'ile kui pole, WindowState maksimeeritud. (Ma seadistasin mõlemat, et seda ei kuvata tööriistaribal ega ükski tekst, aga see on minu eelistuseks).

Seatud pritsima backcolor 43, 186, 255, peamine tagasi valgeks. Määrake kõigi valgete juhtnuppude kõikide fontide värvid.

Pritsimisvormis lisage järgmised juhtelemendid:

Paneel nimetatakse pnllogo. pnllogo backcolor 43, 186, 255. Pnllogo lisada järgmised kontrollid:

  1. pildikast nimega piclogo, suurusega 200 × 200
  2. etikett nimega lbllogo, Font stiilis Segeo UI Light, Light, 48
  3. etikett nimega lbcompany, Fontide stiil Segeo UI Light, Light, 28

Taimer nimega tmrdisplay intervalliga 5000

Peamise vormi korral lisage järgmine kontroll:

Paneel nimetatakse pnlappbar. pnlappbar backcolor mustaks. Pnlappbaril lisada järgmised juhtelemendid:

  1. Nupp nimega bt taotleda, Teksti kuvamine on Rakenda: Fondi stiil Segeo UI Valgus, Valgus, 12: nupu suurus 120 × 45
  2. Nupp nimega btnclose, Teksti kuvamine on Close: Font Style Segeo UI Light, Light, 12: nupu suurus 120 × 45
  3. Nupp nimega btnyes, Kuvatav tekst on Jah: Fontide stiil Segeo UI valgus, valgus, 12: nupu suurus 120 × 45
  4. Nupp nimega btnno, Teksti kuvamine on Ei: Fontide stiil Segeo UI Light, Light, 12: nupu suurus 120 × 45
  5. Silt on nimega lblinfo, Fontide stiil Segeo UI Light, Light, 12
  6. Silt on nimega lblinfo2, Fontide stiil Segeo UI Light, Light, 12

Pritsimiseks lisage järgmine kood:

Private Sub splash_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ‘Set Splash Screen size and begin the Timer Me.WindowState = FormWindowState.Maximized pnllogo.Left = (Me.Width – pnllogo.Width) / 2 pnllogo.Top = (Me.Height – pnllogo.Height) / 2 tmrdisplay.Enabled = True End Sub Private Sub tmrdisplay_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrdisplay.Tick ‘Removes the Splash Screen and displays the Main Application Me.Visible = False main.Visible = True End Sub

Lisage järgmine kood peamisele:

#Region “Set Form” Private Sub main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load setcontrols() End Sub

Public Sub setcontrols() ‘Sets the location for all of the controls on the form. pnlappbar.Width = Me.Width pnlappbar.Left = Me.Left pnlappbar.Height = 100 pnlappbar.Top = Me.Height – pnlappbar.Height btnclose.Left = (pnlappbar.Width – btnclose.Width) – 10 btnapply.Left = (btnclose.Left – btnclose.Width) – 10 btnyes.Left = btnapply.Left btnyes.Top = btnapply.Top btnyes.Visible = False btnno.Left = btnclose.Left btnno.Top = btnclose.Top btnno.Visible = False lblinfo.Left = Me.Left + 200 lblinfo.Visible = False lblinfo.Visible = False lblinfo2.Left = Me.Left + 200 lblinfo2.Visible = False Me.TopMost = True End Sub

Private Sub main_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing ‘Make sure application exits. Application.Exit() End Sub #End Region ‘Set Form

#Region “Apply Button” Private Sub btnapply_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnapply.Click ‘Sets the messages across the appbar and displays the correct buttons. lblinfo.Visible = False btnapply.Visible = False btnyes.Visible = True btnno.Visible = True btnclose.Visible = False lblinfo2.Visible = True lblinfo2.Text = “Changes you made may require a System Restart. Would you like to Restart Now?” End Sub

Private Sub btnapply_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnapply.MouseEnter ‘Sets the messages across the appbar and displays the correct buttons. btnapply.BackColor = Color.Gray lblinfo.Text = “Apply changes you have made to Windows 8” lblinfo.Visible = True End Sub

Private Sub btnapply_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnapply.MouseLeave btnapply.BackColor = Color.Black lblinfo.Visible = False End Sub #End Region ‘Apply Button

#Region “Close Button” Private Sub btnclose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnclose.Click ‘Exit Application Application.Exit() End Sub

Private Sub btnclose_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnclose.MouseEnter ‘Sets the messages across the appbar and displays the correct buttons. btnclose.BackColor = Color.Gray lblinfo.Text = “Close the application without making changes?” lblinfo.Visible = True End Sub

Private Sub btnclose_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnclose.MouseLeave btnclose.BackColor = Color.Black lblinfo.Visible = False End Sub #End Region ‘Close Button

#Region “No Button” Private Sub btnno_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnno.Click ‘Apply your settings ‘We are going to do something here ‘------------------- ‘Sets the messages across the appbar and displays the correct buttons. lblinfo.Visible = False btnapply.Visible = True btnyes.Visible = False btnno.Visible = False btnclose.Visible = True lblinfo2.Visible = False End Sub

Private Sub btnno_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnno.MouseEnter btnno.BackColor = Color.Gray End Sub

Private Sub btnno_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnno.MouseLeave btnno.BackColor = Color.Black End Sub #End Region ‘No Button

#Region “Yes Button” Private Sub btnyes_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnyes.Click ‘Apply your settings ‘We are going to do something here ‘------------------- ‘This code will Restart Windows System.Diagnostics.Process.Start(“shutdown”, “-r -t 05”) Application.Exit() End Sub

Private Sub btnyes_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnyes.MouseEnter btnyes.BackColor = Color.Gray End Sub

Private Sub btnyes_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnyes.MouseLeave btnyes.BackColor = Color.Black End Sub #End Region ‘Yes Button

Anna mulle teada, kui vajate abi.

Allalaadimine: Windows 8 Metro stiili mall Visual Basic 2010 kasutajatele.
Allalaadimine: Windows 8 Metro stiili mall Visual Basic 2010 kasutajatele.

Tervitused! 🙂

Soovitan: