|
Anyone can advice how to implement functions like the ones in the Character map utility to a font dialogue?
Im asked to develop the code page, the character "mapping" and in a font dialogue for extended function.
The problem i have is:
1. how to load the unicode or unicode subrange from the comp. i have no problem with loading the font.
2. how to create the data grid to show all the character with the effect of the font style and font type, just like the ones in the character map utility.
Thx in advance.
|
|
|
|
|
You can develop your own CharacterMapDialog. In which have you can use the character to implement and use it in your application.
1. You can convert the Ascii character to unicode by using ToUnicode Function.
2. Set All Controls Font style to according to selected font.
If you can think then I Can.
|
|
|
|
|
I was trying to disable back button of IE window in the following way but
the back button on top left corner of IE is not disabled.
document = (HTMLDocument)webBrowser.Document;
string javaScriptcode = "javascript:window.history.forward(1);";
IHTMLWindow2 parentWindow = document.parentWindow;
parentWindow.execScript(javaScriptcode, "javascript");
How can I do this
|
|
|
|
|
If you have a webbrowser control, you can just hide the back button. You can't stop a right click and back tho. Instead, you should fix your overall design.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
hi,
I want to ask how to get size of struct that I made?
ex:
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public struct MT_EVENT
{
public Int64 TimeStamp; // In FILETIME format
//public LARGE_INTEGER TimeStamp; // In FILETIME format
public uint UserStatus; // Not used by API
public uint EventCode; // Event Code
public uint SubReason; // Event sub-reason
public uint XtraInfo; // Extra information, e.g. termination
public uint FuncCode; // Function active when this event occurred
public uint Board; // Board ID
public uint Channel; // Global Channel ID (GCI)
public IntPtr ptrBuffer; // Related play/record buffer pointer
public uint DataLength; // Byte length of data accessed (played/recorded)
public IntPtr ptrXtraBuffer; // Pointer to xtra buffer
public uint XtraBufferLength; // Length of buffer pointed by ptrXtraBuffer
public uint XtraDataLength; // Length of data in buffer pointed by ptrXtraBuffer
public uint EventFlag; // Falgs of the following:
// bit 0x00000001: 1 - Appl created the event
// 0 - NTi DLL created the event
// bit 0x00000002: 1 - Appl allocated ptrtraBuffer
// 0 - NTi DLL allocated ptrXtraBuffer
}
|
|
|
|
|
can I use this:
MT_EVENT evt = new MT_EVENT();
uint length= (uint) Marshal.SizeOf(evt);
|
|
|
|
|
Yes, Marshal.SizeOf() Is equlant to sizeof() in c++ and c. It is used to call WinAPI.
But this needs to be before defining class:[StructLayout(LayoutKind.Sequential)]
Example:
[StructLayout(LayoutKind.Sequential)]
public class SomeClass
{
int i;
}
|
|
|
|
|
Hi,
if you are going to pass such a struct to the native world, that would be the way to go, yes.
BTW: the value will vary, depending on Win32/Win64 as an IntPtr is elastic.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Help me to validate datagrid view column to take only flaot value.
|
|
|
|
|
Let me see it's a cell and you want to validate it.
If only someone at Microsoft had the intelligence to to put an OnCellValidating event in the DataGridView, all your problems would be solved.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi All,
I've a DataSet and I want to display all the data(actually each row in the DataSet) in a list view. I've do the following.
<br />
foreach( DataRow dr in ds.Tables[0].Rows )<br />
{<br />
ListViewItem i = listView1.Items.Add(dr.Table.Rows[0]["ID"].ToString());<br />
<br />
i.SubItems.Add(ds.Tables[0].Rows[0]["Group"].ToString());<br />
i.SubItems.Add(ds.Tables[0].Rows[0]["FirstName"].ToString());<br />
i.SubItems.Add(ds.Tables[0].Rows[0]["LastName"].ToString());<br />
}<br />
ds is the DataSet. My question is, first row display all the time. Means the same row in all. Can someone comment on this.
Thanks a lot
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Solved my-self. Refer the wrong index all the time.
I do the following.
<br />
ListViewItem i = listView1.Items.Add(dr["ID"].ToString());<br />
<br />
i.SubItems.Add(dr["Group"].ToString());<br />
i.SubItems.Add(dr["FirstName"].ToString());<br />
i.SubItems.Add(dr["LastName"].ToString());<br />
Any comments appreciate?
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Hi, would like to check with you guys regarding on ListView.
I done several research on Google for listview but cant find what i wanted.
Example my database have 12 records.
I want to display all 12 data into like a table form.
example
4 rows and 3 column
can anyone show me some sample please. thanks
|
|
|
|
|
It is a bit tricky. However I have done that.
Here I am taking a datatable as my datasource
Objective:
Col1 Col2 Col3
1 2 3
4 5 6
7 8 9
10 11 12
I hope you are asking something similar to this.
Approach:
Step 1:
Create a datatable with 3 columns and 4 rows in .cs file of .aspx page PageLoad event
DataTable dtSource = new DataTable();
#region Data Table Creation
dtSource.Columns.Add("Col1");
dtSource.Columns.Add("Col2");
dtSource.Columns.Add("Col3");
#endregion
#region Add Rows
dtSource.Rows.Add("1", "2", "3");
dtSource.Rows.Add("4", "5", "6");
dtSource.Rows.Add("7", "8", "9");
dtSource.Rows.Add("10", "11", "12");
#endregion
Step 2:
Drag & drop a list view in the .aspx page
<asp:ListView ID="myListView" runat="server">
<LayoutTemplate>
<asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
</LayoutTemplate>
<ItemTemplate>
</ItemTemplate>
</asp:ListView>
Step 3:
In the code behind, bind the ListView to the datasource(i.e. datatable)
myListView.DataSource = dtSource;
myListView.DataBind();
Step 4:
Create a user control whose .ascx will be
<table>
<tr>
<td>
<asp:Label ID="lblHeaderCol1" runat="server" Text="Col1"></asp:Label>
</td>
<td>
<asp:Label ID="lblHeaderCol2" runat="server" Text="Col2"></asp:Label>
</td>
<td>
<asp:Label ID="lblHeaderCol3" runat="server" Text="Col3"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblContentColumn1" runat="server"></asp:Label>
</td>
<td>
<asp:Label ID="lblContentColumn2" runat="server"></asp:Label>
</td>
<td>
<asp:Label ID="lblContentColumn3" runat="server"></asp:Label>
</td>
</tr>
</table>
Step 5:
In the code behind of the usercontrol(.ascx) expose some properties
#region Properties
public string Col1 { get; set; }
public string Col2 { get; set; }
public string Col3 { get; set; }
public int Counter { get; set; }
#endregion
As you can make out that the properties name are the same as the column names
Step 6:
In the Load event of the UserControl, consume those properties by the respective label controls
protected void Page_Load(object sender, EventArgs e)
{
lblContentColumn1.Text = Col1;
lblContentColumn2.Text = Col2;
lblContentColumn3.Text = Col3;
Counter = Counter + 1;
if (Counter > 1)
{
lblHeaderCol1.Text = lblHeaderCol2.Text = lblHeaderCol3.Text = String.Empty;
}
}
Step 7:
The last step is to call the user control from the .aspx page
Call it from within the item template
<ItemTemplate>
<uc1:MyUserControl ID="MyUserControl1" runat="server" Col1=<%# DataBinder.Eval(Container.DataItem, "Col1")%> Col2=<%# DataBinder.Eval(Container.DataItem, "Col2")%> Col3=<%# DataBinder.Eval(Container.DataItem, "Col3")%> Counter = <%# Container.DataItemIndex %> />
</ItemTemplate>
So the final ListView will look similar to this
<asp:ListView ID="myListView" runat="server">
<LayoutTemplate>
<asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
</LayoutTemplate>
<ItemTemplate>
<uc1:MyUserControl ID="MyUserControl1" runat="server" Col1=<%# DataBinder.Eval(Container.DataItem, "Col1")%> Col2=<%# DataBinder.Eval(Container.DataItem, "Col2")%> Col3=<%# DataBinder.Eval(Container.DataItem, "Col3")%> Counter = <%# Container.DataItemIndex %> />
</ItemTemplate>
</asp:ListView>
What I am doing?
Basically I have exposed the properties from the user control similar to the columns available in the source and have kept a counter.
I am calling the user control from inside the item template ; so each time the user control will be iterated.
But in that case the headers will also be iterated. Inorder to make it unique, the counter is used which will allow the header to be displayed for only the first time.
N.B.~ This is one of the solutions that came in my mind instantly.
If if get a better idea, i will tell you that.
Or else, any kind of improvement from your side, is highly welcome.
Hope this helps.
Niladri Biswas
|
|
|
|
|
Hi, thanks for your reply..
But tts aspx issint it?
my is an .exe application
|
|
|
|
|
Hi man,
You should have mentioned that you are looking for windows based solution and not web based.
Thanks anyways.
Niladri Biswas
|
|
|
|
|
I have an application that crunches lots of data and during the processing, the
application crashes and I get a message that says "fileappend function failed."
I am not a programmer and hope I have the right forum. My apologies if I have
the wrong one...if I do, please direct me to the proper forum.
Any ideas on how to correct this problem will be greatly appreciated.
Pete Brittain
|
|
|
|
|
Hi,
From some distance the tea leaves in your cup told me your disk is full.
Without giving any detail about the program, its purpose, its language, what do you expect?
Go ask the creator of your app I would say.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
modified on Thursday, June 4, 2009 4:59 AM
|
|
|
|
|
Zopilote32 wrote: I am not a programmer and hope I have the right forum
You are, by definition, in the wrong forum, and on the wrong site. I would suggest you need to talk to the author of your program, but I do concur with the person who suggested you may be out of hard drive space.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
|
And have you made any attempt or would you like someone to simply write it for you?
only two letters away from being an asset
|
|
|
|
|
Even if you where not bright enough to expect code here, would you at least get some common sense and ask in the asp.net forums? I mean if you're going to break a rule and try and get free work at least address a specialized crowd..
|
|
|
|
|
This[^] has the answer to your question.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
Don't delete your messages.
It results in a messy forum.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Believe me, his question made the place messy, too.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|