
MadMaxMSCN
Members-
Posts
23 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by MadMaxMSCN
-
I want to write a small app, that informs me about incoming network connections. Unfortunately I do not know how get that information. Which class can I use? Are there any events? All examples I found on the web were client/server stuff. But I don't have any clients. I want to get notified about all incoming connections at all ports. Thanks for any hints or help, Max
-
The Code shown in my post ist only for testing. In my project it's much more difficult: My task is to upgrade an old vb6-app to vb.net. I have a form: Form1. On Form1 there's a user control: ucCustomForm. ScriptControl is private in ucCustomForm. The user can make some controls at runtime. These Controls are saved in a public property in ucCustomForm. In vb6 the ScriptControl got (AddObject()) this property, a public object from a module and the ucCustomForm object itself. The application has to be converted to vb.net without changing the scripts because there are very much of them. Is this possible?
-
German translation is bad, English texts are more better, often you know what's wrong when you read the English exception text but you have no idea when reading the German. In Spanish it's: "Interfaz no compatible" (looks strange for a German) It doesn't matter if my objects are private, public in form1 or public in button_click. The problem is always the same.
-
Hi everybody, I have to use MSScriptControl in my Application. First I added the reference to MSScriptControl, of course. Then I created some objects and a ScriptControl. When I try to add the objects to the ScriptControl I get an Exception. Dim script As New MSScriptControl.ScriptControl In Button_Click: dim oTest As New Object dim btnTest As New Button script.AddObject("form", Me, True) 'this works script.AddObject("object", oTest, False) 'works, too script.AddObject("button", btnTest, False) 'Exception script.AddObject("otherButton", Me.Button1, False) 'Exception Why do I get this Exception: An unhandled exception of type 'System.InvalidCastException' occurred in WindowsApplication2.exe Additional information: Schnittstelle nicht unterstützt in English: No such Interface supported What's wrong?
-
Thanks for your answer. But that's much too much work. I need this for a upgrade from vb6 to vb.net In vb6 AxPropList was used. If it's not too much work i want to change to PropertyGrid. It seems to be much less work upgrading AxPropList usage to .net than changing to PropertyGrid.
-
Hi I want to use a PropertyGrid in my application to change some properties of some controls in my application at runtime. Is there a way to hide some properties so you can't edit it? The Enabled, the Visible and some other properties should'nt be shown in the PropertyGrid. How can I do this? <BrowsableAttribute(False)> _ Public Property ... would work if I would use my own class to show its properties. But I can't use this for Buttons, Labels and so on because I can't modify their code.
-
i tried #zipLib. works great. for my diploma i should test if it's worth do a upgrade. If it's to difficult to do in a short time i should find a better solution for .net. changing code and using #zipLib is much faster. thank you for your tip.
-
You have to change the size in the ImageList. I never tested it in .net but in vb6 you had to change image size before adding the first image to the ImageList. In .net there's a property ImageList.ImageSize. I don't know if this is what you look for, but it looks good. Tell me if it works, max
-
I'm @gmx.de have 1GB of space here and the spamfilter is very good. it blocks almost everything i don't want to get and it never blocked a mail it should have not blocked. the only "spam" it doesn't block is the gmx-newsletter ;-)
-
yes, i know this. but i'm working here on my diploma and should compare converting and making new. but if making new is so fast as you say, it will make absolutely no sense to try updating.
-
I have a VB6 application using zip32.dll and unzip32.dll that zips and unzip files (of course!) after converting it to VB.NET i get a StackOverflowException in my VBUnzip Function in the red line: Public Function VBUnzip(ByRef sZipFileName As Object, ByRef sUnzipDirectory As String, ByRef iExtractNewer As Short, ByRef iSpaceUnderScore As Short, ByRef iPromptOverwrite As Short, ByRef iQuiet As Short, ByRef iWriteStdOut As Short, ByRef iTestZip As Short, ByRef iExtractList As Short, ByRef iExtractOnlyNewer As Short, ByRef iDisplayComment As Short, ByRef iHonorDirectories As Short, ByRef iOverwriteFiles As Short, ByRef iConvertCR_CRLF As Short, ByRef iVerbose As Short, ByRef iCaseSensitivty As Short, ByRef iPrivilege As Short) As Integer On Error GoTo vbErrorHandler Dim lRet As Integer Dim UZDCL As DCLIST Dim UZUSER As USERFUNCTION Dim UZVER As UZPVER UZVER.Initialize() Dim uExcludeNames As UNZIPnames uExcludeNames.Initialize() Dim uZipNames As UNZIPnames uZipNames.Initialize() msOutput = "" uExcludeNames.uzFiles(0) = vbNullString uZipNames.uzFiles(0) = vbNullString uZipNumber = 0 uZipMessage = vbNullString uZipInfo = vbNullString uVBSkip = 0 With UZDCL .ExtractOnlyNewer = iExtractOnlyNewer .SpaceToUnderScore = iSpaceUnderScore .PromptToOverwrite = iPromptOverwrite .fQuiet = iQuiet .ncflag = iWriteStdOut .ntflag = iTestZip .nvflag = iExtractList .nUflag = iExtractNewer .nzflag = iDisplayComment .ndflag = iHonorDirectories .noflag = iOverwriteFiles .naflag = iConvertCR_CRLF .nZIflag = iVerbose .C_flag = iCaseSensitivty .fPrivilege = iPrivilege .Zip = sZipFileName .ExtractDir = sUnzipDirectory End With With UZUSER .UZDLLPrnt = AddressOf UZDLLPrnt .UZDLLSND = 0 .UZDLLREPLACE = AddressOf UZDLLRep .UZDLLPASSWORD = AddressOf UZDLLPass .UZDLLMESSAGE = AddressOf UZReceiveDLLMessage .UZDLLSERVICE = AddressOf UZDLLServ End With With UZVER .structlen = Len(UZVER) .beta = Space(9) & vbNullChar .date_Renamed = Space(19) & vbNullChar .zlib = Space(9) & vbNullChar End With [color=DarkRed]UzpVersion2(UZVER)[/color] lRet = Wiz_SingleEntryUnzip(0, uZipNames, 0, uExcludeNames, UZDCL, UZUSER) VBUnzip = lRet Exit Function vbErrorHandler: Err.Raise(Err.Number, "CodeModule::VBUnzip", Err.Description) End Function Why is the Exception thrown in this line? In VB6 it worked without any problem. Do you need some other code to help me?
-
You need a listview and an imagelist. put your thumbnails in the imagelist. set the listview's "normal imagelist" property to your imagelist. the listview's view property must be set to 0 - lvwicon. when you add an item to your listview you can give it a name, that will be shown under your thumbnail and a number (the number of the picture in your imagelist).
-
I know that. My ListView is a special one. It contains some kind of tree. The ImageList set in .smallicons works fine, but there is a second one. These icons show if the tree is collapsed or not. I took this tree-ListView from here It works pretty in vb6 but not in vb.net. The first ImageList set in .smallicons works in .net but the second one set with SendMessage doesn't work in .net I don't know how this works, but it does in vb6. :confused: Setting the second one in .smallimages doesn't work, because it overwrites the first one.
-
Hi, I'm converting from vb6 to vb.net I have to set a ImageList to a ListView. In VB6 it's done in this line: ListView_SetImageList = SendMessage(hWnd, LVM_SETIMAGELIST, ByVal iImageList, ByVal himl) himl is set here: himl = ilImageList1.hImageList and hWnd is: hWnd = lvListView.hWnd it works pretty. Now my problem: in vb.net no images are shown. is there a problem with himl or hWnd in vb.net? (no one of those is 0, but is ist the right value??) can anybody help me??
-
I drive a opel kadett e (vauxhall astra a in gb). I it wants it is a good car, but it's so old that it doesn't want that every day. I'm looking forward to my diploma, then the first thing i'll buy is a new car.
-
I got vb 2005 express beta on my computer. had no time to test it, but installation was hell: it lastet over one hour to install it, or better watching installing it itself ... and downloading was not the biggest part of this time
-
you can forget it to believe in this requires I'm running it on a P4 1700, 512MB RAM, 128MB GF-FX details: medium or sometimes even low, screen: 1024x768 when one enemy appears, it becomes so slow you think you're clicking through a dia-show you need a monster-pc that playin' doom³ is fun i have none :o ...hl2 won't be better i think doom³ is too dark. ok there's a thrill when you hear the enemy everywhere and don't see it. but it's not funny when you're not able to see anything, switching light on only to realize you're "walking against a wall" for many seconds
-
�AddressOf� expression cannot be converted to �Integer�
MadMaxMSCN replied to MadMaxMSCN's topic in General
I think it works now. I added the delegate like you told me: Delegate Function DLLPrntDelegate(ByRef fname As CBChar, ByVal x As Integer) then i changed the type of MYUSER.DLLPrnt from integer to DLLPrntDelegate and the line MYUSER.DLLPrnt = FnPtr(AddressOf DLLPrnt) i changed to: MYUSER.DLLPrnt = AddressOf DLLPrnt was this you tried me to tell now i get no Build Error for this line could it be that it works now? I can't test it, because there are still some other build errors... thanks for your link, if it still doesn't work i'll check your link -
�AddressOf� expression cannot be converted to �Integer�
MadMaxMSCN replied to MadMaxMSCN's topic in General
I didn't write the vb6 version of this program, i only got the source to upgrade it. There are 2 .dll files: zip32.dll and Unzip32.dll i don't know what language they're written. -
�AddressOf� expression cannot be converted to �Integer�
MadMaxMSCN replied to MadMaxMSCN's topic in General
Sorry, but when i make the delegate as you tell, there's the same error: AddressOf expression cannot be converted... in the line MYUSER.DLLPrnt = FnPtr(AddressOf DLLPrnt) "AddressOf DLLPrnt" is underlined so removing FnPtr isn't possible because the error is in 'AddressOf' -
�AddressOf� expression cannot be converted to �Integer�
MadMaxMSCN replied to MadMaxMSCN's topic in General
After running the upgrade wizard (without changing any code myself) I get this message: �AddressOf� expression cannot be converted to �Integer� because �Integer� is not a delegate type. for the line: MYUSER.DLLPrnt = FnPtr(AddressOf DLLPrnt) the line before is a upgrade warning created by the wizard: 'UPGRADE_WARNING: Add a delegate for AddressOf DLLPrnt the Function FnPtr you can see in my last post, here is my complete DLLPrnt (without changing any code myself): Function DLLPrnt(ByRef fname As CBChar, ByVal x As Integer) As Integer Dim s0 As String Dim xx As Integer Dim sVbZipInf As String ' always put this in callback routines! On Error Resume Next s0 = "" For xx = 0 To x If fname.ch(xx) = 0 Then xx = 99999 Else s0 = s0 & Chr(fname.ch(xx)) Next xx System.Diagnostics.Debug.WriteLine(sVbZipInf & s0) msOutput = msOutput & s0 sVbZipInf = "" System.Windows.Forms.Application.DoEvents() DLLPrnt = 0 End Function after my try to add a delegate it looks so: Delegate Function DLLPrntDelegate(ByRef fname As CBChar) Function DLLPrnt(ByRef fname As CBChar, ByVal x As DLLPrntDelegate) Dim s0 As String Dim xx As Integer Dim sVbZipInf As String ' always put this in callback routines! On Error Resume Next s0 = "" '#Old: For xx = 0 To x 'Update: convert x to int For xx = 0 To Convert.ToInt32(x) '#UpdateEnd If fname.ch(xx) = 0 Then xx = 99999 Else s0 = s0 & Chr(fname.ch(xx)) Next xx System.Diagnostics.Debug.WriteLine(sVbZipInf & s0) msOutput = msOutput & s0 sVbZipInf = "" System.Windows.Forms.Application.DoEvents() DLLPrnt = 0 End Function It's the first time i use delegates, it's also the first time i use vb.net so i have absolutly no idea what to do here. My delegate-try is completely wrong, isn't it :o -
Hi i have to ugrade a vb6-program to vb.net there's one remaining problem i have: the upgradewizard says: 'UPGRADE_WARNING: Add a delegate for AddressOf DLLPrnt MYUSER.DLLPrnt = FnPtr(AddressOf DLLPrnt) here's my DLLPrnt: Function DLLPrnt(ByRef fname As CBChar, ByVal x As Integer) As Integer and here my FnPtr: ' Puts a function pointer in a structure Function FnPtr(ByVal lp As Integer) As Integer FnPtr = lp End Function i tried to add a delegate, like shown in msdn and on other web pages, for example here: http://www.elitevb.com/content/01,0075/04.aspx unfortunatly the only result was: �AddressOf� expression cannot be converted to �Integer� because �Integer� is not a delegate type. whats wrong, how does it work? thanks for helping max