|
I need to convert an application from Windown appliction to a Silverlight App .
Anyone had an experience with doing something like that?
|
|
|
|
|
There is no simple conversion path.
If the app already follows a client server model, you can keep the same server, and you just need to write a silverlight client. If not, you pretty much need a full redesign of the app.
If you are currently using WPF for the client, you can look at if your XAML fits into the supported silverlight subset
Simon
|
|
|
|
|
Hi,
I am trying to create plug-in for outlook. This plug-in will gets contacts info from web service. I want to add a button in outlook tool bar which should sync all contact into outlook when user clicks on it. I am using C# and .NetFrameWork 2.0. Please help it is very urgent. Thanks in advanced.
A.Asif
|
|
|
|
|
A.Asif wrote: help it is very urgent
Whatever
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Hello all
I am new to .NET. I am looking for some guidance.
I need to create an .NET CF application for Windows Mobile 5/6 devices which involves showing the user a GRID of "N x M" cells. User cannot edit cells or create new cells. It just a GRID display with static text (Sample - R1C1, R1C2 etc.) and the user should be able to move from cell to cell and I should be able to highlight the cell they are moving over.
1. How do I use DataGrid control and not use any data source. In other words I would like to set the number of rows and columns for the grid and need to be called back when the Grid wants to populate each cell. Somthing similar to ListView where one have a callback that will be called to fill the list.
Could you please guide me How I can achieve that?
2. I am looking for a some sample code for .NET/C#. Usually I get the Win32/C++ samples from the Microsoft Visual Studio installs. But I couldn't find any .NET CF samples from MSDN of .NET CF 2.0 install.
Appreciate very much any help!
Thank you very much.
Ganesan
|
|
|
|
|
I have two test apps (acquired from different sources) that include the System.Windows.Forms.TrackBar. The relevant settable properties seem to be equivalent and in the VS Designer, the TrackBars look the same in both apps. But when running, their appearance is different. One has the green bars on the slider and the other doesn't. There must be something different, but I can't find it. Will someone point me in the right direction?
This one shows the green highlight bars. All this code is in the form constructor.
tBarBalance = new System.Windows.Forms.TrackBar();
tBarBalance.AutoSize = false;
tBarBalance.Location = new System.Drawing.Point(x, y);
tBarBalance.Maximum = 320;
tBarBalance.Minimum = -320;
tBarBalance.Name = "tBarBalance";
tBarBalance.Size = new System.Drawing.Size(60, 30);
tBarBalance.TickFrequency = 320;
tBarBalance.TabIndex = i;
tBarBalance.SmallChange = 10;
tBarBalance.LargeChange = 50;
tBarBalance.Tag = line;
tBarBalance.ValueChanged += new System.EventHandler(tBarBalance_ValueChanged);
this.Controls.Add(tBarBalance);
This one doesn't have the green highlight. This code is in the InitializeComponent method. I tried it without the BeginInit and EndInit calls, but that made no difference. The non-default AutoSize = false (from above) made no difference either.
trkBalance = new TrackBar();
((System.ComponentModel.ISupportInitialize)(trkBalance)).BeginInit();
trkBalance.Location = new System.Drawing.Point(56, 46);
trkBalance.Maximum = 10000;
trkBalance.Minimum = -10000;
trkBalance.Name = "trkBalance";
trkBalance.Size = new System.Drawing.Size(108, 45);
trkBalance.TabIndex = 1;
trkBalance.TickFrequency = 1000;
toolTip.SetToolTip(trkBalance, "Balance");
trkBalance.Scroll += new System.EventHandler(trkBalance_Scroll);
this.Controls.Add(trkBalance);
((System.ComponentModel.ISupportInitialize)(trkBalance)).EndInit();
What say ye?
|
|
|
|
|
Hi,
Have a look at Application.EnableVisualStyles(); maybe that is the relevant
difference between both apps.
|
|
|
|
|
Thanks, that's exactly it.
Application.EnableVisualStyles(); was the difference.
|
|
|
|
|
I want to open a window form by a method like that:
frmForm frm_Form = new frmForm();
frm_Form.Show();
frm_Form.Close();
I've marked some window objects (text boxes) public, so I can call them outside.
frm_Form.lblTest.Text = "Hello World";
But I can't see any manipulation on the window, neither in real time nor in debugging mode.
How can I show my Window, do some actions on it and dispose it afterwards ?
|
|
|
|
|
hi
using(frmForm frm = new frmForm())
{
frmForm.ShowWindow(this);
// the using block call the Close/Dispose methode
// so yopu don't need to call Close() or Dispose()
}
regards
|
|
|
|
|
There is no ShowWindow method in C# in .NET Framework 2.0.
|
|
|
|
|
Hi,
if all the code you've shown is running on the GUI thread (say inside a
button_click handler) then none of it will have a visible effect, since
the GUI actions will get queued until your code reaches its end: it is only
when the GUI thread is done dealing with the button click that it can start executing the queued stuff in a hurry.
Do you really want to show a form and (almost immediately) close it again??
Normally a form gets closed by an explicit user action, such as clicking
an OK button or the close box.
Remedy: reorganise your code, at least separate the Form.Close from everything
else (use another event, such as a button click, a timer tick, whatever).
BTW: DO NOT include delays in handlers, don't try Thread.Sleep() inside a
button click handler, it does not make any sense whatsoever.
Mind you there is one dangerous hack that may or may not be useful here:
include some Application.DoEvents() calls; they are bound to cause weird
effects if used inappropriately though.
|
|
|
|
|
There shouldn't be a button window close handling.
This should be a status window running while actions (calling C# methods and functions) are running. That's why it should be opened when actions start and closed when finished.
|
|
|
|
|
Try inserting
frm_Form.Invalidate()
when you want the form to update/refresh itself. (I wouldn't do this after every single content change, but probably after a group of updates). Invalidate() doesn't immediately update the form, but is usually sufficient. If Invalidate() doesn't update it when you expect, try calling
frm_Form.Refresh()
From my understanding, Refresh() prompts an immediate redraw of a form (although I could be mistaken).
Brandon
|
|
|
|
|
Tried Refresh() and worked , Invalidate didn't do it Form won't only be displayed correctly in debugging mode. But that's ok.
The best way of practise would be if I can do a periodical refresh on the form. But use of form object in Timer section and TimerElapsedEventHandler at the same time produces an error saying refresh can't be done when form is in both sections. If the user switches away and back to the program it seems as if the app has hung up. Because it's waiting for finishing the current process.
|
|
|
|
|
Hi ;
I want to send and receive msgs using SIM .
I created an App. and I want to add a feature to it .. like sending a msg to specified number...
actually, what I want to do is , when I send a msg "OFF" to my PC from anywhere , I want it to shutdown .
Just I want to know how can I send and receive , plz ?! (VB.net)
|
|
|
|
|
I have a datagridview bound to a dataview.
The user click on a column :
- add a sort column type system.int
- set the dataview.sort to the column field clicked
- add several datarows to the datatable ( partial total row )
- while adding the total rows update the column added at the beginning to a numeric sequential value ( 1,2,3,4,....)
- when the rows end change the dataview.sort to the sort column
If the user click to another column :
- delete the rows that contains the total
- redo everything for the new column that the user click on it
The problem is that everything is ok, because I see in the datagrid the sort column added with the sequential correct value, but the dataview doesn't update .
Can someone help ?
Regards
Andrew
|
|
|
|
|
hi
im currently working on a project that requires me to print a card,the card is a usercontrol with come labels on it with a backroundImage as a bitmap file and a color card printer ,the problem is when i print it only prints the labels and not the backround ,so i have a white backround with my labels ,i tried it on a normal paper color printer and it still does not work.
any help would be much appreciated
thanks
regards paula
|
|
|
|
|
Why don't you just create a usercontrol that can custom paint an image with the labels and background image? That way you do not need to rely on some painting of multiple controls.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
i am trying to create a schedule control where you can add/edit/delete appointments, select
start and end hour, have a day or week view....
I have been doind some research on it but no luck
I hope some one can help me
Thanks in advance
|
|
|
|
|
there is a schedular control here on CP
http://www.codeproject.com/KB/custom-controls/schedule.aspx
(sorry chrome won't allow me to post it as a link )
|
|
|
|
|
plz check the below code.i am trying to drag a node from a tre view and drop it into a textbox
the code didnt show me any error but i coudnt drop the node to the textbox.
private void treeView2_DragEnter(object sender, DragEventArgs e)
{
treeView2.DoDragDrop(treeView2.Nodes, DragDropEffects.Copy);
}
private void textBox7_DragEnter(object sender, System.Windows.Forms.DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.Text))
e.Effect = DragDropEffects.Copy;
}
private void textBox7_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
{
textBox7.Text = e.Data.GetData(DataFormats.Text).ToString();
}
plz anybody tell me wat the error is
|
|
|
|
|
tracywitty wrote: if (e.Data.GetDataPresent(DataFormats.Text))
My first guess would be that Text data is not present. You can use tracing ( ) to see all the formats in the Data.
foreach (string s in e.Data.GetFormats())
Debug.WriteLine(string.Format("DragEnter: {0}", s));
led mike
|
|
|
|
|
If you're using sample code to figure out how to do drag/drop in a treeview, you need to do your best to follow that sample code EXACTLY.
One thing no documentation will ever tell you is that drag/drop actually invokes into the COM world under the covers, and any data errors or exceptions thrown there will never be seen by your code - it will just appear to not work and you won't know why.
In other words, you need to understand very clearly what you are doing when implementing drag/drop - it's relatively straightforward in .NET, but has some pitfalls you need to be aware of.
|
|
|
|
|
I am using 'ADOX.Catalog' namespace and the following code to create a new MS Access database.
Private Function CreateAccessDatabase() As Boolean
'-------------------------------------------------------
'This method is called to create a new Access database
'Required: NewDBConnectionString
'-------------------------------------------------------
Dim ADOXCatalog As New ADOX.Catalog
Try
If Me.NewDBConnectionString.Trim.ToString.Length = 0 Then Throw New Exception("Connection string is not specified")
'Call create method to create a new database
ADOXCatalog.Create(Me.NewDBConnectionString.Trim.T oString)
Return True
Catch ex As Exception
Throw ex
Return False
Finally
If Not ADOXCatalog Is Nothing Then
ADOXCatalog = Nothing
End If
End Try
End Function
The moment it created database, it is also leaving a .ldb file in the same directory. I don't want that .ldb file. If I tried to delete the file forcedly, it is passing an exception "The file is being used....". All the connection strings are properly closed.
Can anyone help me to remove this .ldb file.
|
|
|
|