Novo

Forum kao aplikacija na telefonu

Dodajte forum na početni ekran i koristite ga kao aplikaciju, sa menijem na dnu ekrana.

  • 6 odgovora
  • 4.924 pregleda

Najnovija ↓

Re: VB.NET 2008 - Kako napraviti balon ! 01.06.2008. u 18:42 · pre 224 meseca #4
Evo ja sam ovo pokušao prevesti u VB.NET

Cod izgleda ovako :

Code:

Private Sub Form1_Move(ByVal sender As Object, ByVal e As EventArgs) 
    'This code causes the form to not show up on the task bar only in the tray. 
    'NOTE there is now a form property that will allow you to keep the 
    'application from every showing up in the task bar. 
    If Me Is Nothing Then 
        'This happen on create. 
        Return 
    End If 
    'If we are minimizing the form then hide it so it doesn't show up on the 
    'task bar 
    If Me.WindowState = FormWindowState.Minimized Then 
        Me.Hide() 
        notifyIcon1.ShowBalloonTip(3000, "Test App", "The App has be moved to the tray.", ToolTipIcon.Info) 
    Else 
        'any other windows state show it. 
        Me.Show() 
    End If 
    
End Sub 


Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As FormClosingEventArgs) 
    'There are several ways to close an application. 
    'We are trying to find the click of the X in the upper right hand corner 
    'We will only allow the closing of this app if it is minimized. 
    If Me.WindowState <> FormWindowState.Minimized Then 
        'we don't close the app... 
        e.Cancel = True 
        'minimize the app and then display a message to the user so 
        'they understand they didn't close the app they just sent it to the tray. 
        Me.WindowState = FormWindowState.Minimized 
        'Show the message. 
        notifyIcon1.ShowBalloonTip(3000, "Test App", "You have not closed this appliation." + CChar((13)) + "It has be moved to the tray." + CChar((13)) + "Right click the Icon to exit.", ToolTipIcon.Info) 
    End If 
End Sub 



Private Sub notifyIcon1_DoubleClick(ByVal sender As Object, ByVal e As EventArgs) 
    If Me.WindowState = FormWindowState.Minimized Then 
        Me.Show() 
        Me.WindowState = FormWindowState.Normal 
    End If 
    
    ' Activate the form. 
    Me.Activate() 
    Me.Focus() 
End Sub 


Nisam isprobao još .
Re: VB.NET 2008 - Kako napraviti balon ! 01.06.2008. u 18:47 · pre 224 meseca
izmenjeno 1 put, poslednji put deerbeer 01.06.2008. u 18:58
  1. deerbeer01.06.2008. u 18:58zapis iz teksta poruke
#5
Pa mozes da preradis ovaj primer(ako te mrzi da sve to portujes u VB.NET)
tako da napravis "User controlu" kao dll pa onda je takvu dodaj kao poseban projekat u solution-u ...
iskompajliras je u C# a koristis njene funkcije u VB.NET-u ...
Potpis
Viva lollapalooza
Re: VB.NET 2008 - Kako napraviti balon ! 01.06.2008. u 19:32 · pre 224 meseca #6
Uh nisam se toga sjetio,"deerbeer",samo ne znam dali c# cod moze pozvati VB.Net iz Funkcije.Nisam baš jak sa tim pozivanjem funkcija iz dll-ova sa C# codovima,kada je dll u c# kodu.
Re: VB.NET 2008 - Kako napraviti balon ! 02.06.2008. u 00:00 · pre 224 meseca #7
Citat:
Air Live: Uh nisam se toga sjetio,"deerbeer",samo ne znam dali c# cod moze pozvati VB.Net iz Funkcije.Nisam baš jak sa tim pozivanjem funkcija iz dll-ova sa C# codovima,kada je dll u c# kodu.

Moze i to veoma lako ...dodaj u tvoj vb.net projekat kontrolu na Add Refference ...
u zaglavlju .vb fajla stavis using namespace i vozis dalje kao da je VB.NET ...

Ovaj primer je lagan za prevodjenje u VB.NET ...
al ako budes kasnije dodavao neke slozenije kontrole (vise koda u sebi)
imaj to na umu olaksaces sebi zivot jer neces morati sve da prevodis ...
Potpis
Viva lollapalooza
Prijavite se da biste odgovorili u ovoj temi.PrijavaRegistracija

Premeštanje teme