|
hello all,
thanks for visiting this question. Iam a beginner in VB.NET and working with Log4net(v1.2.10). Can anyone please put up sample examples of how to do logging/error trapping using the log4net framework written in VB.NET ?? all help is welcome !
Thanks
R.H
ps. C# are no real help as I need to work only with VB.NET
|
|
|
|
|
All you have to do is Google for "log4net vb.net[^]" and you'll come up with examples.
|
|
|
|
|
Hey:
I want to write some text on the on each cell of rowheaders of Datagrid. I mean on the first column of the datagrids which has the mouse pointer on it.
Is it possible to do it? If yes, can you plesae guide me.
Regards,
Hari
|
|
|
|
|
Are you familiar with creating your own custom controls? If not, you'll have a hard time with this. There's no step-by-step guide to tell you how to do this either.
Basically, your going to have to handle the RowPostPaint[^] event and paint the text yourself. If you want some examples, you'll have to Google for them. Click[^]. I don't have any.
|
|
|
|
|
hi hari,
use following statement
DataGridView1.Rows(rowno).HeaderCell.Value = "YourText"
also be sure RowHeadersVisible property of datagridview1 is set to TRUE
Hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
hey. i've been searching in the net, but couldnt find it.
1)disable the "X" button on the right top corner
2)create a button that when pressed it closes the application.
im in a hurry because i have to send this work to my teacher in a few hours.
thks in advance
|
|
|
|
|
1 - you can remove it entirely in the properties for the form, in the designer
2 - the app can call a number of methods, but this.Close() is the easiest.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hum.. i couldnt find in the form the "designer"..
and in visual basic express edition 2005 it doesnt know this.close() argh.. really cant find it!
|
|
|
|
|
Having opened the form in Visual Studio, hit F4 to get the properties taskpane showing. Set ControlBox property to False.
Oh, and he meant Me.Close() .
this.Close() is C#.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
|
|
|
|
|
in the properties of the form, you want to remove set the controlbox property to false, this will also remove mina nd max buttons, you can't remove Close button individually...not that i'm aware of?
The code convention for refering to the form in code in vb.net is me not this (which is C#).
Posted by The ANZAC : "WWBD, What Would Buffy Do?" : "I don't know man, she's stronger than me"
|
|
|
|
|
I have a panel on my form that is docked with a gradient image on it. I then have a group box on top of that with some objects in it. How can I get it so that the image on the panel object shows thru the group box....or at least get the image to form all the way around the group box. It seems like where the text is for the group box, it still shows the system colors.
Any suggestions?
Thanks
Tom Wright
tawright915@gmail.com
|
|
|
|
|
Unfortunatly the 'Transparent' backcolor setting for controls just gives you the same single backcolor as the Form the control is on. So normally you would not get gradient Image to show at all.
However, you could override the Groupbox paint events and work out which bits of the image need to be painted under it, and paint them manually.
If the Group box is in a fixed position I would suggest just pasting the appropriate bit of the gradient image into the group box background image.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
|
|
|
|
|
You know for half a day it did not click with me what you said.....until now. So I set the background image property of my main form and ala peanut butter and jelly sandwiches.....the group box was filled in exactly like I wanted it too.
Thanks for the help
Tom Wright
tawright915@gmail.com
|
|
|
|
|
I'm working on (someone else's) VB6 code, and they're using the following variable names
Char
Module
These also appear to be keywords in VB6. Does it really allow you to do that without complaining?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Yep. Not the most brilliant thing to allow in code, but it's perfectly legal in VB6.
|
|
|
|
|
Any sort of work in VB6 is bound to provide several WTF moments. VB6 is just like that.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: Any sort of work in VB6 is bound to provide several WTF moments.
So true. Care if I use this as a sig?
|
|
|
|
|
Hi all,
In Vb2005, I need to develop a program that sends alphanumeric sequences to a device. These sequences have to be random and must not repeat any previous one done during the same day. I cannot store the used sequences, neither in disk nor in memory.
Any idea on how to do that?
thanks in advance,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
You haven't said anything describing these "random sequences". How long are they? Variable length? What are the legal characters? Any illegal characters? Does if have to be in a certain format? Can the sequences be patially similar to previous ones in the same day? (Like "these" and "this")
You're going to have to "remember" the sequences somewhere to make sure that you don't use the same one twice. "Random" doesn't mean "unique" acrossed the set of available numbers.
|
|
|
|
|
Hi Dave,
these random sequences have to be 6 digits long and composed using 0 to 9 and A to Z characters.
The intention was to make an alphanumerical counter but we want something more elaborated that seems a random number.
I was thinking to use an encrption algorithm where the string to encrypt shoud be the counter. By this way I shouldn't have to store the strings already done and I just have to store the actual counter value.
Thanks,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
You could do this, but ANY RNG can generate the same sequence of characters somewhere down the line, however unlikely it may seem.
RNGCryptoServiceProvider Class[^].
|
|
|
|
|
Hi again,
as I said I don't really need a random number, I just need a unique 6 digit number that it seems random, so, do you a encryption wrapper class that takes a 6 digit counter and encrypts it to a 6 digit alphanumeric string. That would do the job, but I don't know which one does it!!
Thanks in advance,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
Hi Marc,
The first thing that comes to mind is to make use of Now() . Whenever you call it, it will give you a different value, and it will never ever repeat.
You could for example use its .Hour , .Minute and .Second parts, and replace leading zeros with a random letter from A to Z.
Alternatively each datetime is a number as far as the computer is concerned, and will also nerver ever repeat, so you could use that in some sort of algorithm or formula.
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
I need to add escape characters to a VB string but I get errors.
The string needs a double quote, and an asterisk
ie. "this is the string \" \*"
Problem is, this isn't working...something about a type mis-match.
Any ideas?
|
|
|
|
|
To do double quotes, you have to use two of them to escape it:
Dim stringWithDoubleQuotes As String = "This is a ""test..."""
The contents of the string will be This is a "test..."
|
|
|
|