|
If you're trying to do what I think you're trying it might be best to you the region methode
just create a regionpath and set the region of you're usercontrol to it
you're regionpath would be the same as you're path you draw for the jagged edge (so you can use that code)
also this will make sure that when you're user clicks just outside of the edge it will not fire the onclick of you're usercontrol and you will not have to worry about seeing the usercontrol behind you're jagged edge
hope this helps
|
|
|
|
|
Hey,
It worked! Thanks alot!
|
|
|
|
|
always pleased to help someone
|
|
|
|
|
|
Sorry I pressed the enter button one too many time
|
|
|
|
|
ASPnoob wrote: Sorry I pressed the enter button one too many time
No worries, it happens sometimes
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
i am facing a problem in two dimensional array, i found the substitute of two dimensional array.i.e list class.
i was trying to add the items in the following manner.
dim s as new list(type of string)
s.add("svsfv","ssfvs")
but it takes one parameter .
is there any way to accomplish it using two paramaters, or any alternative ?
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
A two dimensional array is created via a list of lists, assuming you want to create it using dynamic containers, instead of a 2D array.
list(type of list(type of string ) )
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 )
|
|
|
|
|
if u please provde me an example to implement the two dimensional or list class.
Thanks....
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Create lists of strings, and then add them to the main list that I showed you how to create above. A 2D array is probably a lot simpler, if you want it to be fixed size.
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 )
|
|
|
|
|
list containe value and key parameters.
and i want to pass both the paraeters at rutime.(both are dynamic).
in that case how i will get to know the key name?
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
In that case, what you really want is a dictionary, which is an associative container.
If you don't know the key name, why are you looking up a value based on that key ? You can only look up a value where you know the key or index. You can iterate over all keys in a dictionary, but you need some way of knowing which one you wanted.
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 )
|
|
|
|
|
Your code didn't create a two dimensional array. You created an instance of a List, which is not an array, but a collection.
To create a 2 dimensional array, it's simple:
Dim myArray(10, 50) As String
Creates an array of 10 rows, with 50 columns each.
I seriously suggest picking up a book or two on VB.NET for beginners. This is a concept that's usually covered in week 2 of any VB.NET 101 course.
|
|
|
|
|
I have a solution that has around 150 forms. I need to make another paralell version that will change code in just around 5 forms. I want to be able to "branch" the original solution and share most of the forms and just change some.
I've tried different approachs: "linking" the files to the new project. Inheriting the original project into the new one ... nothing works smoothly.
Any thougths.
Thanks.
Salvador
|
|
|
|
|
I think you want one solution with three projects:
- app1 (EXE file)
- app2 (EXE file)
- whatever is common to both (a class library, hence DLL file)
|
|
|
|
|
Thanks for your response.
This is pretty much what I'm looking for, but I don't know how to "build" the solution in Visual Studio 2005: 2 or 3 projects, how to compile, how to make reference to shared components, what namespace to use, etc, ...
|
|
|
|
|
Are you familiar with Visual Studio at all ?
if not, you need to read up on it, and start with a little Windows app,
"Hello World" would be fine (say 20 lines of code).
Then, inside the same solution, create a "Class library" called "Adder" pretty much
the same way; make it a class that holds a static method to add two numbers
(resulting in a DLL), which you can not "run" nor "debug" on its own.
Now go back to "hello world" and call your latest class to add two numbers; it will
fail to compile until you "add a reference" telling where "Hello World" can find the "Adder"
class, that's a reference to Adder.dll
It now should run fine; you have made two projects, one EXE one DLL.
Thats the technique; now you master this, you may start turning to your actual code
(probably in another solution).
You should read up on Visual Studio; all the above is basic information that you
will need on a dayly basis. Look around, read the Visual Help; if you dont understand
any of it, go find a book on Visual Studio; if you feel you understand, but get stuck
on a very particular issue, ask on a forum like this one.
|
|
|
|
|
I've been successfully developing in VS2005 for more than a year. I've never needed to use a DLL, I'm sorry if my question seemed too basic ...
Anyway, thank you very much your response has been very helpfull.
|
|
|
|
|
OK,
some more details:
- when you add a new project, you get a choice of different templates; use "Windows
application" for normal stuff (EXE), or "Class library" for callable code in a DLL.
- when a project wants to refer to the output of another library project (a DLL),
you must add a reference to said DLL into the Solution Pane so the calling project
knows where to find it.
- the solution has a "build order" and a "dependency graph" but these get adjusted
automatically; dont worry.
That should put you on track.
|
|
|
|
|
Hello,
I have a datagridview that has a combo box column with some items in it.
I click the item in the combo box and based on what the user has clicked on to, it should EndEdit. However, i have to click on another cell for the edit to complete.
I have tried using EndEdit thinking that it should end the edit in that combo box cell. However, the customer would like to end the edit in the cell as soon as they click an item.
I have posted the code for the selected_item event for the comb box, if this is helpful.
Private Sub dgvPendingOrders_EditingControlShowing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewEditingControlShowingEventArgs) Handles dgvPendingOrders.EditingControlShowing<br />
<br />
If TypeOf e.Control Is DataGridViewComboBoxEditingControl Then<br />
Me.dgvPendingCbo = DirectCast(e.Control, DataGridViewComboBoxEditingControl)<br />
End If<br />
End Sub<br />
<br />
Private Sub dgvPendingCbo_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles dgvPendingCbo.SelectedIndexChanged<br />
Try<br />
'Do something here<br />
'End the edit<br />
End If<br />
Catch ex As Exception<br />
MsgBox(ex.Message)<br />
End Try<br />
End Sub
Many thanks for any help,
Steve
|
|
|
|
|
You should be able to end the edit in the SelectedIndexChanged event of the ComboBox
"Okay, I give up: which is NOT a real programming language????"
Michael Bergman
|
|
|
|
|
Hi
I am just getting back into programming for a specific application in my small business. My skills are reasonable, but I'd appreciate actual code examples where possible so I can convert it. I would (for simplicity) like to use an Excel speadsheet merely as a data base for each date.
How do I have a DateTimePicker (or other similar control):
1/ Attempt to save as yyyy/mm/dd (sql format using Try)
2/ If it exists ask "yyyy/mm/dd" already exists. Do you wish..."
3/ When I choose a date, it attempts to load (Try) a file of that date "yyyy/mm/dd", other wise catches and loads a blank. (I think I can do the last bit sort of ok)
Frank
|
|
|
|
|
I'm alone in the dark! HELP!!
|
|
|
|
|
1/ To store the date in that format when entering into the database use this
'DateTime is the name of the variable (this is just for example)
DateTime = Format(DateTime,"yyyy/MM/dd")
This will store it in the format yyyy/mm/dd
2/ Query the database (use a stored procedure as inline SQL is prone to SQLInjection Attacks)
CREATE PROCEDURE DoesDateExist(@Date_Value DATETIME)
AS
SELECT
*
FROM
Table_Name
WHERE
date_value > @Date_Value
AND date_value < DATEADD(day,1,@Date_Value)
This is a simple procedure, you need to create your own according to your data structure, I was just trying to put you on the right path. As for #3, you said you can do that one so I wont answer it Last modified: 44mins after originally posted -- Inadvertanly used the LIKE keyword on a DATETIME field
"Let's face it, the average computer user has the brain of a Spider Monkey."
Bill Gates
|
|
|
|
|
You can use LIKE for a DATETIME ?
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 )
|
|
|
|