
Nazgulled
Avatar/Signature-
Posts
120 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by Nazgulled
-
nevermind, I just fixed it with something like this: Select Case (m.Msg) Case WM_NCRBUTTONDOWN If (m.WParam.ToInt32() = HTCAPTION) Then Return Case WM_NCLBUTTONDOWN If (m.WParam.ToInt32() = HTCAPTION) Then Me.Activate() Return End If End Select
-
What I basically want to do is not to allow the user to move the form window around... For the whole WndProc Function I had the following code before: This is just the constantes I use so you know cause I may be doing something wrong with them: Private Const WM_NCRBUTTONDOWN As Integer = &HA4 Private Const WM_QUERYENDSESSION As Integer = &H11 Private Const WM_NCHITTEST As Integer = &H84 Private Shared HTCLIENT As New IntPtr(1) Private Shared HTCAPTION As New IntPtr(2) If (m.Msg = WM_NCHITTEST) Then MyBase.WndProc(m) If (IntPtr.op_Equality(m.Result, HTCAPTION)) Then m.Result = HTCLIENT End If ElseIf (m.Msg = WM_QUERYENDSESSION) Then exitApp = True Me.notifyIcon.Visible = False MyBase.WndProc(m) Else MyBase.WndProc(m) End If but then I realized I could still move the windo right clicking on the titlbar and choose "Move" from the menu... so what I thought to "fix" tha was to disable that menu and to disable that I could disable the rightclick on the titlebar with the following code: If (m.Msg = WM_NCRBUTTONDOWN) Then Return ElseIf (m.Msg = WM_NCHITTEST) Then MyBase.WndProc(m) If (IntPtr.op_Equality(m.Result, HTCAPTION)) Then m.Result = HTCLIENT End If ElseIf (m.Msg = WM_QUERYENDSESSION) Then exitApp = True Me.notifyIcon.Visible = False MyBase.WndProc(m) Else MyBase.WndProc(m) End If However, that code doesn't work. It doesn't matter if I right click on the titlebar, the code will go through the If (m.Msg = WM_NCRBUTTONDOWN) directly to ElseIf (m.Msg = WM_NCHITTEST). That's why I tried to change from WM_NCHITTEST to WM_NCLBUTTONDOWN as you could see in my other replys, cause doing it that way he would go to the first If because one was for the right click and the other to left click but I had some other problems wich are making me go back to this code I had before. So, my real problem is, how to disable the rightclick menu on the titlebar? How can I make it respond to the If (m.Msg = WM_NCRBUTTONDOWN) before going directly to ElseIf (m.Msg = WM_NCHITTEST)? I hope I didn't make any confusion...
-
Is there any way to make divil's sandbar control like windows xp? I mean, instead of office renders and all that, I wanted the menus and buttons to render with the actual windows xp visual style the user is running. Is this possible? How?
-
I thought of that... but as you say, it will cost a lot of resources...
-
What I meant by directly was in the panel properties, you just load the icon, all alpha-blended colors with still be there. But I fixed the problem with a workaround. I used the sandbar control on my app, so I loaded the icons I wanted to some menu options and made the parent menu invisible and I just associate the menu icons to the status bar icon whenever I need it.
-
That's not what I want... I want to lock a file/folder from everyone on every account. There must be a way to do itas there is other apps that do this. I don't need to hide porn from my mother as I'm the only one using my pc and forgeting the fact that my mother has no clue on how working with a pc :P
-
Maybe I expressed myself wrong... The graphics are alpha-blended, not transparent. And like I said, it works if I load them directly but it doesn't work if I add them to an Imagelist and then convert them using the code above. I suppose that if it worksadding them directly there must be a way to it coding it.
-
Is it possible somehow to choose lock folders/files from everyone? Even yourself? I mean, I want to do this little app where you need a password to open it and when inside you can protect files/folders and as long as the protection is on, no one (even you) can see/open the fiels folders. Is it possible? How? I've tried to look at the API and shell acces and all that stuff, but I just can't find a away...
-
Hi, I've been searching a lot for this and I found a solution but not exactly working as I expected. I have an ImageList with a list of images in PNG format and I want to add one of those images to the icon propertie in a status bar for instance. The image on ImageList is System.Drawing.Bitmap and the icon on the statusbar is System.Drawing.Icon, that means I can't do this: Me.StatusBar1.Icon = Me.ImageList1.Images(0) so, after my search I found this, wich works: Dim icoStatus As Icon icoStatus = Icon.FromHandle(DirectCast(Me.ImageList1.Images(0), Bitmap).GetHicon) Me.StatusBar1.Panels(0).Icon = icoStatus However, the problem is right here, the transparency of the iamge is not there and so the images looks weird, but it works; but I want it to work with transparency. By the way, I tested with PNG and ICO files, but the results were the same. If I load the image directly from my hard drive to the icon property, it works fine, the transparency is there. So, what can I do to ahve the trasnparency stay there using and ImageList? I want this because the status bar will have a different image depeding on some factors. Any help?
-
I porbably wouldn't be able to do that because I can't use any parameter on Application.Run as I want it to start hidden and it won't if I do Application.Run(Form1) I know that my example was like that and maybe I mislead(does this word even exist) you a bit... However, someone suggested me the following code (wich happened to work well for me): Module Module1 Dim Form1 As Form1 Public Sub Main() [iMPORTANT LINE OF CODE] Form1 = New Form1 Just_A_Function() Application.Run(Form1) End Sub Public Sub Just_A_Function() Form1.Text = "Form1 Title" End Sub End Module
-
@PlausiblyDamp could you please give me an example? my main langauge is not english and there are some "coding language" that I don't fully understand, so, I didn't exactly understood what you asked me... @Nerseus I don't think that will be an option, you see, that was an example. In fact, I have more than 1 function and depending on the functions I have lots of properties to change in the form...
-
First, when I said XP Visual Styles I didn't mean the use had to use them/seem them by force... It's support for them, that means if you use TGTSoft StyleXP or the UXTheme Patch so you could change visual styles without using programs like WindowBlinds, my application will get skinned too, othewise, it won't, that's what this dill component does, it does not force you to use the Luna Visual Styles. The component I'm using is this: http://www.skybound.ca/developer/visualstyles/ They have documentation, who said they didn't? Why are you being so harsh on them? You didn't even knew what I was talking about or the people who wrote it or if they had or not documentation... That line of code is the following: Skybound.VisualStyles.VisualStyleProvider.EnableVisualStyles() cuz just adding the dll to you rapplication won't do anything, you must call that to initialize the component, and it must be done before creating the form. In the documentation they have it like this: [Visual Basic] Public Shared <STAThread()> _ Sub Main() Skybound.VisualStyles.VisualStyleProvider.EnableVisualStyles() Application.Run(New Form1()) End Sub
-
Hi, It's like this: I have one form (Form1) and I have one Module. Module Code Module Module1 Public Sub Main() [iMPORTANT LINE OF CODE] Dim Form1 As New Form1 Just_A_Function() Application.Run(Form1) End Sub Public Sub Just_A_Function() Form1.Text = "Form1 Title" End Sub End Module This won't work as you can see and coul be easly fixed if I declared Dim Form1 As New Form1 outside of the Sub Main, however, this declaration must be after [iMPORTANT LINE OF CODE]. That important line of code is a dll control I found on the internet so my application uses XP Visual Styles and that line of code must be before the form is created so I need to put it before I delcare Form1, since I am declaring it as New. How can I fix this? Isn't there a way to declare a public variable in a local variable declaration? Or some other way around to fix it? Thanks in advance.
-
My application starts from a Sub Main() (in a module of course), and to really run it I have Application.Run (on the sub main()). I have an icon set with the main form, and when I do Alt+Tab, I see that default icon that looks like a window (from windows). However, if I set ShowInTaskbar = True, my icon is there on Alt+Tab, but I don't want to, I want it set to False but I want my icon to be displayed in Alt+Tab, is it possible somehow to do this?
-
Nevermind... I fixed with from: Application.Run(frmMain) to Application.Run() it's now working as I wanted :)
-
ok.. if you say so... thanks
-
damn the 10 charachter limit for a reply... :P 512mb
-
Hi, On Form1_Load(), I try Me.Hide but it doesn't work. Can anyone tell me why? This application has a tray icon and I want it to start hidden, why doesn't Me.Hide works on the form load event? If I create a button and add Me.Hide() to the button private sub, it works. Heck, if I had a timer with 1ms interval and add Me.Hide() to the timer private sub it works too. This is currently my way of hiding it; I disable the timer right after hiding though. But I always see the form for a small fraction of a second and I don't want to....
-
Hi, I don't if this is correct but I think that the *.resx files holds data like graphics, icons and that right? So, I have 2 forms in my application, the 2 files together makes a total of 169Kb. My final exe in release mode has 236Kb and 240Kb in debug mode. Isn't that too much? My 2 forms and 1 module (everything I use) makes a total of about 25Kb. So, 236-169=67, 67-25=42. Shouldn't the exe be 42Kb smaller? What/How do you suggest me to reduce the executable file size?
-
Hi, I started a new project and without chaging any form property, without coding anything, I just build the exe and it's process on the task manager was about 14.XXX Kb isn't that too much? I'm asking this, because I'm coding a simple app wich creates/reads/writes texts files and has a few options, 2 forms, nothing much, simple thing and it has about 16.XXX Kb of memory usage, sometimes goes lower, I think I saw it around 10/11.XXX Kb one time, I think it was on Release instead of Debug. Nevertheless, isn't too much?
-
Everyone forget this... I'll code my application differently, thanks anyway to everyone that tried to help me :)
-
that variable is always empty, after fomr.hide() or after form.show() and if I have focus or not on the form, it's always empty...
-
it doesn't work... I tried and tried but can't find a way to dit... I need a vraible wich tells me if the form has focus or not... with that it was pretty simple but I guess there's no such thing... at least I can't find it :S
-
I didn't exactly understood what you want me to try...