|
Ista wrote:
"Whats is polymorphism" Its like duh, I've been programming c++ and Java for 5+ years and I'm really more for design patterns than an introduction to programming
Well, maybe you should check out Design Patterns[^].
-Nick Parker
|
|
|
|
|
well alrighty then. It looks like a must buy
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Don't see a form property that will allow me to leave a form open while accessing the parent form... how is this functionality achieved...???
thanks,
vince
|
|
|
|
|
Form1 fm = new Form1();
fm.Show();
modal is
fm.ShowDialog();
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
thanks for the reply... I tried using Form.Show()and it had no effect, still couldn't access the parent form without closing the child dialog... any other ideas...???
There's nothing special about the app, can't understand why it won't let me shift focus to the parent....
thanks for any more help,
vince
|
|
|
|
|
something like this
public class FormChild
{
private Form objParent;
public Form Parent
{
get
{
return objParent;
}
set
{
objParent=value;
}
FormChild_Load(object sender, EventArgs e )
{
MessageBox.Show(objParent.Name);
}
}
public Class ParentForm
{
...
Main
FormChild child = new FormChild();
child.Parent = this;
child.Show();
}
That should work, I might mistype though but you have to supply a cycle reference
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Thanks a again for the help....
That's basically how I've coded my main and child form, but still no luck... As I said before, there's nothing special about either of the forms, main is a treeview/listview pair with a "settings" button that launches a child form... child form contains various controls (textboxes, buttons, monthcalendar control, status bar), and the only custom constructor (if you can call it that) accepts a string that is used to initialize a textbox...
Thanks for any other suggestions...
vince
|
|
|
|
|
Well that method works, you could even pass in a reference to this in the constructor and set it that way in the child form. But if you set it it will be able to cycle back.
If you have an email I can make a quick demo project
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
I wanted to try out one of those starter kits on the asp.net website, but it told me I had to download MSDN...
So I did....
and when I click on the 'setup.exe' it comes up with a message box that say...
"A strong SA password is required for security reasons.
Please use SAPWD switch to supply the same. Refer to
readme for more details. Setup will now exit."
I checked the readme, but of course there's nothing there...
What is the solution???
/\ |_ E X E GG
|
|
|
|
|
Contrary to what you are saying, the MSDE readme (at least the sp3 version) has a section called Desktop Engine Setup Arguments. It is a high security risk installing MSDE with a blank SA password. That is why MSDE setup does not allow it.
To solve it, before installing it, you should edit the setup.ini file that is in the same directory as the setup.exe. The following line should be added:
SAPWD=yourpassword, where yourpassword is the password of your choice.
Then start setup.exe and installation will succeed.
Of course, if you want to disregard security and install without a SA password you can put the following line instead of the above.
BLANKSAPWD=1
This overrides the default behavior of the installer. But I strongly discourage you from using this last option since it opens a serious security hole in MSDE.
|
|
|
|
|
Ok, I choose your answer. It was the best... and easiest.
/\ |_ E X E GG
|
|
|
|
|
If you look at the download page http://www.microsoft.com/downloads/details.aspx?FamilyID=a0dac778-60a6-4b11-8aa8-bf12261a303a&DisplayLang=en[^], you'll see the following instructions near the bottom of the page:
After extracting the MSDE installation files, open an MS-DOS command prompt and change to the directory where you extracted the files. MSDE extracts to C:\sql2ksp3\MSDE by default. Run the following command to set up MSDE for Visual Studio .NET. Replace <your sa="" password=""> with the systems administrator's password that you would like to use:
Setup.exe /qb+ INSTANCENAME=VSDOTNET DISABLENETWORKPROTOCOLS=1 SAPWD=<YOUR SA PASSWORD>
|
|
|
|
|
ok, gracias.
/\ |_ E X E GG
|
|
|
|
|
What property controls the initial visible default state of a datagrid in a Windows .Net Form?
My application fills a datagrid during form load from a oledb database query.
When the form is loaded the datagrid is blank except for a cell with a + sign
Once the + is clicked then a second cell is shown containing a link. After the link
is clicked the grid then is filled with the data.
How can I programmatically complete the first two clicks so that when the form is loaded
the user sees a full grid of data instead of having to click on the + and then on the link.
Thanks so much
|
|
|
|
|
try referencing the table instead of the dataset
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
I need to convert WBMP (wireless bitmap) into regular bmp (or png or jpg), in my code. Anyone know any library that does that?
thanks
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|
|
Hi,
How to get the parameters (connection string etc) from a .udl file through c# code
Thanks in advance
Jerin
|
|
|
|
|
Open the file with a text editor, e.g. Notepad. Here's one I prepared earlier (lines broken for clarity):
[oledb]
; Everything after this line is an OLE DB initstring
Provider=Microsoft.Jet.OLEDB.4.0;
<font color=#c080c0>+</font> Data Source=C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb;
<font color=#c080c0>+</font> Persist Security Info=False As you can see, it's basically just an INI file format. You can find an INI file reader here[^].
|
|
|
|
|
Hi there.
I had 3 questions to ask.
1)
Public Event ButtonClicked(MessageBoxNumber As Integer, OKButton As Boolean, CancelButton As Boolean, ExitButton As Boolean)
--> how to code this in c#? If not mistaken, if they used the keyword WithEvent i will use delegates and events. But now is the keyword event! Any sample codes base on top?
2)
Public Property Let MessageBoxPrompt(MessageBoxNumber As Integer, ByVal vData As String)
MBox(MessageBoxNumber).Prompt = vData
End Property
MBox is a type of MessageBox
--> oh okay, i know c# got get and set, but there is no let. And can i assign property with arguments like MessageBoxNumber as integer, etc...
3) in vb6, you had in operator '\' for division integer, how can i achieve this in c#?
Any help, please?
Thanks.
Regards,
Chua Wen Ching :p
|
|
|
|
|
Public Event Buttonclicked(MessageBoxNumber As Integer,
OKButton As Boolean, CancelButton As Boolean,
ExitButton As Boolean)
...becomes...
public event ButtonClickedEventHandler ButtonClicked;
protected void OnButtonClicked(ButtonClickedEventArgs args)
{
if(ButtonClicked!=null)
ButtonClicked(this,args);
}
To raise the event:
OnButtonClicked(new ButtonClickedEventArgs(messageboxnumber,
Then outside your class, you will need:
public delegate void ButtonClickedEventHandler(object sender, ButtonClickedEventArgs e);
public class ButtonClickedEventArgs : EventArgs
{
int m_MessageBoxNumber=0;
bool m_OKButton=false;
bool m_CancelButton=false;
bool m_ExitButton=false;
public ButtonClickedEventArgs(int messageboxnumber,
bool okbutton,bool cancelbutton,
bool exitbutton)
{
m_MessageBoxNumber=messageboxnumber;
m_CancelButton=cancelbutton;
m_OKButton=okbutton;
m_ExitButton=exitbutton;
}
public int MessageBoxNumber
{
get
{
return m_MessageBoxNumber;
}
}
public bool CancelButton
{
get
{
return m_CancelButton;
}
}
public bool OKButton
{
get
{
return m_OKButton;
}
}
public bool ExitButton
{
get
{
return m_ExitButton;
}
}
}
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Why 1 vb6 short code, in c# i need to code so much?
Any idea?
Regards,
Chua Wen Ching :p
|
|
|
|
|
The C# way of doing it has many advantages, icluding:
* You can assign lots of different events to the same method.
* You can very easily hook and unhook events at runtime.
* The C# event implementation is much more flexible.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
VB is meant for RAD which mean they ignored details for you. Good for general purpose programming, bad for advanced.
|
|
|
|
|
As for question #2:
In C#, a property set is the same as a property let - and that's how things should be.
You cannot pass arguments to a property. You can, however, use indexers or a method.
And question #3:
Try casting the values to integers after performing division on them.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
For question 2, i got an error:
This is how i code:
public string SmallWindowPrompt(int SmallWindowNumber, string vData)
{
get
{
return this.SM[SmallWindowNumber];
}
set
{
SM[SmallWindowNumber] = vData;
}
}
When i compile, it says i need to place 2 semicolons right after get and set.
I just change the variable name, but it is based on question 2..
any help?
Thanks for everyone replies.
Regards,
Chua Wen Ching :p
|
|
|
|